#ifndef IMPORTDIALOG_H
#define IMPORTDIALOG_H

#include <QDialog>
#include <QLayout>
#include <QPushButton>
#include <QCheckBox>
#include "Util.h"
#include "FileInfoBox.h"
#include "LabelSpinBox.h"

class ImportDialog : public QDialog
{
Q_OBJECT
public:
	explicit ImportDialog(QWidget* parent = nullptr);
	~ImportDialog() override;

private:
	QVBoxLayout* mainLayout;

	QHBoxLayout* headLayout;
	QHBoxLayout* buttonLayout;

	LabelSpinBox* width;
	LabelSpinBox* height;
	LabelSpinBox* frameCount;

	FileInfoBox* body;
	FileInfoBox* shadow;
	FileInfoBox* remap;

	QPushButton* qButton;
	QPushButton* okButton;
	QPushButton* cancelButton;

	QCheckBox* isFormZero;

private slots:
	void OnQButtonClicked();
	void OnOkButtonClicked();
	void OnCancelButtonClicked();

private:
	bool CheckArgsOk() const;

private:
	McsImportArgs CurrentArgs;
public:
	[[nodiscard]] inline const McsImportArgs& GetArgs() const { return CurrentArgs; }
};


#endif //IMPORTDIALOG_H
